#include "VertexBuffer.h"
#include <glad/glad.h>
#include <SERender/Util/Util.h>

namespace SEngine
{

    VertexBuffer::VertexBuffer()
    { glCall(glGenBuffers(1, &m_id)); }

    VertexBuffer::~VertexBuffer()
    { glDeleteBuffers(1, &m_id); }

    void VertexBuffer::Bind()
    { glCall(glBindBuffer(GL_ARRAY_BUFFER, m_id)); }

    void VertexBuffer::Unbind()
    { glCall(glBindBuffer(GL_ARRAY_BUFFER, 0)); }

} // namespace SEngine
